package com.pkk.log.web.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @description: 日志的页面控制器
 * @author: peikunkun
 * @create: 2019-07-14 00:12
 **/
@Slf4j
@Controller
public class LogWebPageController {

  @RequestMapping("modules/{module}/{url}.html")
  public String module(@PathVariable("module") String module, @PathVariable("url") String url) {
    return "modules/" + module + "/" + url;
  }

  /**
   * @Description: 首页
   * @Param: []
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2019/7/14 0014 下午 12:07
   */
  @RequestMapping(value = {"index.html"})
  public String index() {
    return "index";
  }

  /**
   * @Description: 根目录
   * @Param: []
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2019/7/14 0014 下午 12:07
   */
  @RequestMapping(value = {"/"})
  public String redirectIndex() {
    return "redirect:index.html";
  }

  /**
   * @Description: 登录
   * @Param: []
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2019/7/14 0014 下午 12:07
   */
  @RequestMapping("login.html")
  public String login() {
    return "login";
  }

  /**
   * @Description: 内容页
   * @Param: []
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2019/7/14 0014 下午 12:07
   */
  @RequestMapping("content.html")
  public String content() {
    return "content";
  }


  /**
   * @Description: 首页的内容
   * @Param: []
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2019/7/14 0014 下午 12:07
   */
  @RequestMapping("main.html")
  public String main() {
    return "main";
  }

  @RequestMapping("editor.html")
  public String editor() {
    return "editor";
  }


  /**
   * @Description: 404页面
   * @Param: []
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2019/7/14 0014 下午 12:08
   */
  @RequestMapping("404.html")
  public String notFound() {
    return "404";
  }
}
